package controller.main
{
	import events.main.EventNewProject;
	
	import model.ModelLibrary;
	import model.ModelProject;
	import model.ModelRooms;
	import model.ModelSelection;
	
	import org.robotlegs.mvcs.Command;
	
	public class CommandNewProject extends Command
	{
		[Inject]
		public var mp:ModelProject;
		
		[Inject]
		public var ml:ModelLibrary;
		
		[Inject]
		public var mr:ModelRooms;
		
		[Inject]
		public var ms:ModelSelection;
		
		override public function execute() : void {
			mp.projectName = mp.DEFAULT_PROJECT_NAME;
			mp.projectModified = false;
			mp.projectFilePath = null;
			mr.roomsDataProvider.removeAll();
			
			ml.clear();
			ms.selectedObjects.removeAll();
			ms.selectedTiles.removeAll();
		}
	}
}